import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, process.cwd())
  return {
    plugins: [vue()],
    server: {
      port: 3000,
      proxy: {
        '/feign': {
          target: 'http://localhost:8001',
          changeOrigin: true,
          secure: false
        }
      }
    },
    resolve: {
      alias: {
        '@': '/src'
      }
    },
    define: {
      'process.env': {}
    }
  }
})
